
package com.insigma.business.qrcode.soldier.service.impl;



import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.CompanyTypeDao;
import com.insigma.business.qrcode.soldier.dto.CompanyTypeBSearcher;
import com.insigma.business.qrcode.soldier.entity.CompanyTypeDO;
import com.insigma.business.qrcode.soldier.service.CompanyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("companyTypeService")
public class CompanyTypeServiceImpl implements CompanyTypeService {

    @Autowired(required = false)
    private CompanyTypeDao companyTypeDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<CompanyTypeDO> search(final CompanyTypeBSearcher companyTypeBSearcher) {
        return companyTypeDao.search(companyTypeBSearcher);
    }
   
    @Override
    public CompanyTypeDO get(final String id){
        return companyTypeDao.get(id);
    }

    
    @Override
    public Integer insert(final CompanyTypeDO companyTypeDO){
        companyTypeDO.setId(sequenceGenerator.genKey("COMPANY_TYPE_ID"));
        return companyTypeDao.insert(companyTypeDO);
    }

    
    @Override
    public Integer update(final CompanyTypeDO companyTypeDO){
        return companyTypeDao.update(companyTypeDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return companyTypeDao.delete(id,modifierType,modifierId);
    }

}
